package e_qrcode.zXing;

import java.awt.Color;

/**
 * logo 背景配置
 * @author Y
 *
 */
public class LogoConfig {
	public static final Color DEFAULT_BORDERCOLOR = Color.WHITE; //logo默认边框颜色
	public static final int DEFAULT_BORDER = 2; //logo默认边框宽度
	public static final int DEFAULT_LOGOPART = 5; //logo大小默认为照片的1/5
	private final int border = DEFAULT_BORDER; //默认边框宽度
	private final Color borderColor; //边框颜色
	private final int logoPart; //边框外围宽度
	
	/**
	 * 二维码无参构造函数 默认设置logo图片颜色为白色,宽度为2
	 */
	public LogoConfig(){
		this(DEFAULT_BORDERCOLOR,DEFAULT_LOGOPART);
	}
	
	/**
	 * 二维码有参构造函数
	 * @param bordercolor	边框颜色
	 * @param logopart		边框宽度
	 */
	public LogoConfig(Color bordercolor, int logopart) {
		//设置边框
		this.borderColor = bordercolor;
		//设置边框宽度
		this.logoPart = logopart;
	}
	
	/**
	 * 获取边框颜色
	 * @return
	 */
	public Color getBorderColor() {
		return borderColor;
	}
	
	/**
	 * 外围变宽
	 * @return
	 */
	public int getLogoPart() {
		return logoPart;
	}
	
	/**
	 * 获取边框
	 * @return
	 */
	public int getBorder() {
		return border;
	}
	
	
	
	
}
